<?PHP

/**
 * LoginView 
 * 
 * @package 
 * @version $id$
 * @author Thomas Dahlberg 
 * @license PHP Version 3.0 {@link http://www.php.net/license/3_0.txt}
 */
class LoginView {
    /**
     * DoLoginBox 
     * 
     * @access public
     * @return string
     */
    public function DoLoginBox() {
        return "
            <form>
                Användarnamn: <input type=\"text\" name=\"userName\" /><br />
                Lösenord: <input type=\"password\" name=\"password\" /><br />
                <input type=\"submit\" name=\"logIn\" value=\"Logga in\" /> Kom ihåg mig: <input type=\"checkbox\" name=\"rememberMe\" />
            </form>
        " ;
    }
    /**
     * DoLogoutBox 
     * 
     * @access public
     * @return string
     */
    public function DoLogoutBox() {
        return "
            <form>
                <input type=\"submit\" name=\"logOut\" value=\"Logga ut\" />
            </form>
        " ;
    }
    /**
     * GetUserName 
     * 
     * @access public
     * @return string
     */
    public function GetUserName() {
        $userName = $_GET['userName'] ;
        return (isset($userName)) ? $userName : "NULL" ;
    }
    /**
     * GetPassword 
     * 
     * @access public
     * @return string
     */
    public function GetPassword() {
        $password = $_GET['password'] ;
        return (isset($password)) ? $password : "NULL" ;
    }
    /**
     * TriedToLogin 
     * 
     * @access public
     * @return bool
     */
    public function TriedToLogin() {
        return (isset($_GET['logIn'])) ? true : false ;
    }
    /**
     * TriedToLogout 
     * 
     * @access public
     * @return bool
     */
    public function TriedToLogout() {
        return (isset($_GET['logOut'])) ? true : false ;
    }
}
